<?php

namespace Ue\ErpBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * OrderHistory
 *
 * @ORM\Table(name="ue_order_history", indexes={@ORM\Index(name="ue_order_history_order_id_idx", columns={"order_id"}), @ORM\Index(name="ue_order_history_type_id_idx", columns={"type_id"}), @ORM\Index(name="ue_order_history_status_id_idx", columns={"status_id"}), @ORM\Index(name="ue_order_history_admin_id_idx", columns={"admin_id"})})
 * @ORM\Entity
 */
class OrderHistory
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="status", type="string", length=20, nullable=false)
     */
    private $status;

    /**
     * @var string
     *
     * @ORM\Column(name="comment", type="string", length=200, nullable=false)
     */
    private $comment;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
     */
    private $createdAt;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime", nullable=false)
     */
    private $updatedAt;

    /**
     * @var \Admin
     *
     * @ORM\ManyToOne(targetEntity="Admin")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="admin_id", referencedColumnName="id")
     * })
     */
    private $admin;

    /**
     * @var \Order
     *
     * @ORM\ManyToOne(targetEntity="Order")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="order_id", referencedColumnName="id")
     * })
     */
    private $order;

    /**
     * @var \Status
     *
     * @ORM\ManyToOne(targetEntity="Status")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="status_id", referencedColumnName="id")
     * })
     */
    private $status2;

    /**
     * @var \OrderHistoryType
     *
     * @ORM\ManyToOne(targetEntity="OrderHistoryType")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="type_id", referencedColumnName="id")
     * })
     */
    private $type;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set status
     *
     * @param string $status
     * @return OrderHistory
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status
     *
     * @return string 
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Set comment
     *
     * @param string $comment
     * @return OrderHistory
     */
    public function setComment($comment)
    {
        $this->comment = $comment;

        return $this;
    }

    /**
     * Get comment
     *
     * @return string 
     */
    public function getComment()
    {
        return $this->comment;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return OrderHistory
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return OrderHistory
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime 
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set admin
     *
     * @param \Ue\ErpBundle\Entity\Admin $admin
     * @return OrderHistory
     */
    public function setAdmin(\Ue\ErpBundle\Entity\Admin $admin = null)
    {
        $this->admin = $admin;

        return $this;
    }

    /**
     * Get admin
     *
     * @return \Ue\ErpBundle\Entity\Admin 
     */
    public function getAdmin()
    {
        return $this->admin;
    }

    /**
     * Set order
     *
     * @param \Ue\ErpBundle\Entity\Order $order
     * @return OrderHistory
     */
    public function setOrder(\Ue\ErpBundle\Entity\Order $order = null)
    {
        $this->order = $order;

        return $this;
    }

    /**
     * Get order
     *
     * @return \Ue\ErpBundle\Entity\Order 
     */
    public function getOrder()
    {
        return $this->order;
    }

    /**
     * Set status2
     *
     * @param \Ue\ErpBundle\Entity\Status $status2
     * @return OrderHistory
     */
    public function setStatus2(\Ue\ErpBundle\Entity\Status $status2 = null)
    {
        $this->status2 = $status2;

        return $this;
    }

    /**
     * Get status2
     *
     * @return \Ue\ErpBundle\Entity\Status 
     */
    public function getStatus2()
    {
        return $this->status2;
    }

    /**
     * Set type
     *
     * @param \Ue\ErpBundle\Entity\OrderHistoryType $type
     * @return OrderHistory
     */
    public function setType(\Ue\ErpBundle\Entity\OrderHistoryType $type = null)
    {
        $this->type = $type;

        return $this;
    }

    /**
     * Get type
     *
     * @return \Ue\ErpBundle\Entity\OrderHistoryType 
     */
    public function getType()
    {
        return $this->type;
    }
}
